<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>TURN Server: StunMsg Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">TURN Server
   &#160;<span id="projectnumber">1.5</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">StunMsg Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for StunMsg:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classStunMsg.png" usemap="#StunMsg_map" alt=""/>
  <map id="StunMsg_map" name="StunMsg_map">
<area href="classStunMsgChannel.html" alt="StunMsgChannel" shape="rect" coords="0,56,116,80"/>
<area href="classStunMsgIndication.html" alt="StunMsgIndication" shape="rect" coords="126,56,242,80"/>
<area href="classStunMsgRequest.html" alt="StunMsgRequest" shape="rect" coords="252,56,368,80"/>
<area href="classStunMsgResponse.html" alt="StunMsgResponse" shape="rect" coords="378,56,494,80"/>
</map>
 </div></div>

<p><a href="classStunMsg-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5b13e4f433e68ef55648a0738b3a58bc"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a5b13e4f433e68ef55648a0738b3a58bc">StunMsg</a> ()</td></tr>
<tr class="memitem:aee311c2eb4a6cd0840ca498ff11dff03"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#aee311c2eb4a6cd0840ca498ff11dff03">StunMsg</a> (u08bits *buffer, size_t total_sz, size_t sz, bool constructed)</td></tr>
<tr class="memitem:a07c2ae950129b7869ed79afd4307d07d"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a07c2ae950129b7869ed79afd4307d07d">~StunMsg</a> ()</td></tr>
<tr class="memitem:ae315ec46d477612832f36458e0f964d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#ae315ec46d477612832f36458e0f964d3">construct</a> ()</td></tr>
<tr class="memitem:afb36e443795dd4f760c413421322f315"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#afb36e443795dd4f760c413421322f315">isValid</a> ()</td></tr>
<tr class="memitem:a66edc72784a2af33cfa9ad35fd9814e4"><td class="memItemLeft" align="right" valign="top">u08bits *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a66edc72784a2af33cfa9ad35fd9814e4">getRawBuffer</a> ()</td></tr>
<tr class="memitem:a4c2ff78d25c4217b3974019f218f2d72"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a4c2ff78d25c4217b3974019f218f2d72">getSize</a> () const </td></tr>
<tr class="memitem:a858e738a2ea56c9c00a125eb68c2516b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a858e738a2ea56c9c00a125eb68c2516b">setSize</a> (size_t sz)  throw (WrongStunBufferFormatException)</td></tr>
<tr class="memitem:a0624d56ce50c59a7e749e7be59cdcbb4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a0624d56ce50c59a7e749e7be59cdcbb4">addAttr</a> (<a class="el" href="classStunAttr.html">StunAttr</a> &amp;attr)  throw (WrongStunAttrFormatException, WrongStunBufferFormatException)</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aed38f03aa20465cc66051fec9a071946"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#aed38f03aa20465cc66051fec9a071946">isCommand</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:ac7895f294ab3b6701b60c31a82b9f487"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#ac7895f294ab3b6701b60c31a82b9f487">isIndication</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a844074aa00f3f678817992adc3308ed9"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a844074aa00f3f678817992adc3308ed9">isRequest</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a74b0e86f9c89de7884934be759e1a600"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a74b0e86f9c89de7884934be759e1a600">isSuccessResponse</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a32f29bec620dbaca3160ca0d0212b5fe"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a32f29bec620dbaca3160ca0d0212b5fe">isErrorResponse</a> (u08bits *buffer, size_t sz, int &amp;err_code, u08bits *err_msg, size_t err_msg_size)</td></tr>
<tr class="memitem:a3dc7a30e786c367eb70fa2426d285fb7"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a3dc7a30e786c367eb70fa2426d285fb7">isChallengeResponse</a> (const u08bits *buf, size_t sz, int &amp;err_code, u08bits *err_msg, size_t err_msg_size, u08bits *realm, u08bits *nonce)</td></tr>
<tr class="memitem:af32d3daa4574c7dc9669adf144bcd107"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#af32d3daa4574c7dc9669adf144bcd107">isChannel</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:aca80073bcfe7a9f5275794f33ab80d2b"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#aca80073bcfe7a9f5275794f33ab80d2b">isFingerprintPresent</a> (u08bits *buffer, size_t sz)</td></tr>
<tr class="memitem:a754793ef94c092b0d6844ce70a1b2645"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a754793ef94c092b0d6844ce70a1b2645">checkFingerprint</a> (u08bits *buffer, size_t sz)</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a9ce9b7c01db4a75d1d2901eeee7336eb"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a9ce9b7c01db4a75d1d2901eeee7336eb">constructBuffer</a> ()=0</td></tr>
<tr class="memitem:a28e718fc21dd2a60886d8dd6bd4c5b05"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a28e718fc21dd2a60886d8dd6bd4c5b05">check</a> ()=0</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aea2510fd3224f6e62197302be66d2df3"><td class="memItemLeft" align="right" valign="top">u08bits *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a></td></tr>
<tr class="memitem:a1b846d9cf7437a436810f20546dcfa2f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a1b846d9cf7437a436810f20546dcfa2f">_deallocate</a></td></tr>
<tr class="memitem:a96e06f00cba0b06a6c177afceec197d4"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a96e06f00cba0b06a6c177afceec197d4">_allocated_sz</a></td></tr>
<tr class="memitem:a4388e0163c81ece0381df12de4c1b22a"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a></td></tr>
<tr class="memitem:a33bf3b219467baa9a6eaec860be85b33"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStunMsg.html#a33bf3b219467baa9a6eaec860be85b33">_constructed</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Generic "STUN Message" class, base class for all messages </p>

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00458">458</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a5b13e4f433e68ef55648a0738b3a58bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classStunMsg.html#a5b13e4f433e68ef55648a0738b3a58bc">StunMsg::StunMsg</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00460">460</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                  {
                <a class="code" href="classStunMsg.html#a96e06f00cba0b06a6c177afceec197d4">_allocated_sz</a> = 0xFFFF;
                <a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a> = (u08bits*)turn_malloc(<a class="code" href="classStunMsg.html#a96e06f00cba0b06a6c177afceec197d4">_allocated_sz</a>);
                <a class="code" href="classStunMsg.html#a1b846d9cf7437a436810f20546dcfa2f">_deallocate</a> = <span class="keyword">true</span>;
                <a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a> = 0;
                <a class="code" href="classStunMsg.html#a33bf3b219467baa9a6eaec860be85b33">_constructed</a> = 0;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aee311c2eb4a6cd0840ca498ff11dff03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classStunMsg.html#a5b13e4f433e68ef55648a0738b3a58bc">StunMsg::StunMsg</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>total_sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>constructed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00468">468</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                               :
                <a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>(buffer), <a class="code" href="classStunMsg.html#a1b846d9cf7437a436810f20546dcfa2f">_deallocate</a>(<span class="keyword">false</span>), <a class="code" href="classStunMsg.html#a96e06f00cba0b06a6c177afceec197d4">_allocated_sz</a>(total_sz),
                <a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a>(sz), <a class="code" href="classStunMsg.html#a33bf3b219467baa9a6eaec860be85b33">_constructed</a>(constructed) {}
</pre></div>
</div>
</div>
<a class="anchor" id="a07c2ae950129b7869ed79afd4307d07d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classStunMsg.html#a07c2ae950129b7869ed79afd4307d07d">StunMsg::~StunMsg</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00472">472</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                           {
                <span class="keywordflow">if</span>(<a class="code" href="classStunMsg.html#a1b846d9cf7437a436810f20546dcfa2f">_deallocate</a> &amp;&amp; <a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>) {
                        turn_free(<a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>, <a class="code" href="classStunMsg.html#a96e06f00cba0b06a6c177afceec197d4">_allocated_sz</a>);
                }
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a0624d56ce50c59a7e749e7be59cdcbb4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classStunMsg.html#a0624d56ce50c59a7e749e7be59cdcbb4">StunMsg::addAttr</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classStunAttr.html">StunAttr</a> &amp;&#160;</td>
          <td class="paramname"><em>attr</em></td><td>)</td>
          <td>  throw (<a class="el" href="classWrongStunAttrFormatException.html">WrongStunAttrFormatException</a>, <a class="el" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00543">543</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                                        {
                <span class="keywordflow">return</span> attr.<a class="code" href="classStunAttr.html#a9827b6398968e6623431ba587b8e22a4">addToMsg</a>(*<span class="keyword">this</span>);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a28e718fc21dd2a60886d8dd6bd4c5b05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classStunMsg.html#a28e718fc21dd2a60886d8dd6bd4c5b05">StunMsg::check</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implemented in <a class="el" href="classStunMsgChannel.html#ac216bdfd5366612b88478e26c3dfcef8">StunMsgChannel</a>, <a class="el" href="classStunMsgIndication.html#aec16cb06737f85b26d75c94b08d131ae">StunMsgIndication</a>, <a class="el" href="classStunMsgResponse.html#adf301e9ec83d5b4b8c3b4c620378983c">StunMsgResponse</a>, and <a class="el" href="classStunMsgRequest.html#a5f3a5d319bd5395c35a01976acfa44df">StunMsgRequest</a>.</p>

</div>
</div>
<a class="anchor" id="a754793ef94c092b0d6844ce70a1b2645"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#a754793ef94c092b0d6844ce70a1b2645">StunMsg::checkFingerprint</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00539">539</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                 {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a8bd3ed5e7a38ef21a43b12b66f9d8e4c">stun_is_command_message_full_check_str</a>(buffer, sz, 1);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ae315ec46d477612832f36458e0f964d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classStunMsg.html#ae315ec46d477612832f36458e0f964d3">StunMsg::construct</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00477">477</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                         {
                <a class="code" href="classStunMsg.html#a9ce9b7c01db4a75d1d2901eeee7336eb">constructBuffer</a>();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a9ce9b7c01db4a75d1d2901eeee7336eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classStunMsg.html#a9ce9b7c01db4a75d1d2901eeee7336eb">StunMsg::constructBuffer</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implemented in <a class="el" href="classStunMsgChannel.html#a039febe86ef1033c2059d96a75e3df82">StunMsgChannel</a>, <a class="el" href="classStunMsgIndication.html#a0b38b6785600bfb679cfe8601cce32c5">StunMsgIndication</a>, <a class="el" href="classStunMsgResponse.html#ae1f72dfb7085611cb6d518962e680d0d">StunMsgResponse</a>, and <a class="el" href="classStunMsgRequest.html#a6c001f78a6e0600f18cabe75153a6f1c">StunMsgRequest</a>.</p>

</div>
</div>
<a class="anchor" id="a66edc72784a2af33cfa9ad35fd9814e4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u08bits* <a class="el" href="classStunMsg.html#a66edc72784a2af33cfa9ad35fd9814e4">StunMsg::getRawBuffer</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00484">484</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                {
                <span class="keywordflow">return</span> <a class="code" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">_buffer</a>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a4c2ff78d25c4217b3974019f218f2d72"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classStunMsg.html#a4c2ff78d25c4217b3974019f218f2d72">StunMsg::getSize</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00488">488</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                               {
                <span class="keywordflow">return</span> <a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a3dc7a30e786c367eb70fa2426d285fb7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#a3dc7a30e786c367eb70fa2426d285fb7">StunMsg::isChallengeResponse</a> </td>
          <td>(</td>
          <td class="paramtype">const u08bits *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>err_code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>err_msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>err_msg_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>realm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>nonce</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00519">519</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                        {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a0fd8b30d2c2684c12355a1f416d0be71">stun_is_challenge_response_str</a>(buf, sz, &amp;err_code, err_msg, err_msg_size, realm, nonce);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="af32d3daa4574c7dc9669adf144bcd107"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#af32d3daa4574c7dc9669adf144bcd107">StunMsg::isChannel</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00525">525</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                          {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a1751b7757b11749c6a75a13e4f444e49">is_channel_msg_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aed38f03aa20465cc66051fec9a071946"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#aed38f03aa20465cc66051fec9a071946">StunMsg::isCommand</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00498">498</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                          {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a0ec34e642f8cbf785ecef76f7fb0d87b">stun_is_command_message_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a32f29bec620dbaca3160ca0d0212b5fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#a32f29bec620dbaca3160ca0d0212b5fe">StunMsg::isErrorResponse</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>err_code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>err_msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>err_msg_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00514">514</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                                              {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#ac73cfbf0bdd56b17d57927aefa7673d8">stun_is_error_response_str</a>(buffer, sz, &amp;err_code, err_msg, err_msg_size);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="aca80073bcfe7a9f5275794f33ab80d2b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#aca80073bcfe7a9f5275794f33ab80d2b">StunMsg::isFingerprintPresent</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00529">529</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                     {
                <span class="keywordflow">if</span>(!<a class="code" href="ns__turn__msg_8h.html#a0ec34e642f8cbf785ecef76f7fb0d87b">stun_is_command_message_str</a>(buffer,sz))
                        <span class="keywordflow">return</span> <span class="keyword">false</span>;
                <a class="code" href="ns__turn__msg_8h.html#ad78e84b431d789f6799b3dabf786e032">stun_attr_ref</a> sar = <a class="code" href="ns__turn__msg_8h.html#a05ac5979839241de8b46e4ebdc145722">stun_attr_get_first_by_type_str</a>(buffer, sz, STUN_ATTRIBUTE_FINGERPRINT);
                <span class="keywordflow">if</span>(!sar)
                        <span class="keywordflow">return</span> <span class="keyword">false</span>;

                <span class="keywordflow">return</span> <span class="keyword">true</span>;
        }
</pre></div>
</div>
</div>
<a class="anchor" id="ac7895f294ab3b6701b60c31a82b9f487"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#ac7895f294ab3b6701b60c31a82b9f487">StunMsg::isIndication</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00502">502</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                             {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a5eea6f087499dad7e35c950b30b0f5cf">stun_is_indication_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a844074aa00f3f678817992adc3308ed9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#a844074aa00f3f678817992adc3308ed9">StunMsg::isRequest</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00506">506</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                          {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a056f82760a5c80f0bc497872d534045b">stun_is_request_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a74b0e86f9c89de7884934be759e1a600"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static bool <a class="el" href="classStunMsg.html#a74b0e86f9c89de7884934be759e1a600">StunMsg::isSuccessResponse</a> </td>
          <td>(</td>
          <td class="paramtype">u08bits *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00510">510</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                  {
                <span class="keywordflow">return</span> <a class="code" href="ns__turn__msg_8h.html#a94312a39c2c9f79b8f89bc3b70105186">stun_is_success_response_str</a>(buffer, sz);
        }
</pre></div>
</div>
</div>
<a class="anchor" id="afb36e443795dd4f760c413421322f315"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classStunMsg.html#afb36e443795dd4f760c413421322f315">StunMsg::isValid</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00480">480</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                       {
                <span class="keywordflow">return</span> <a class="code" href="classStunMsg.html#a28e718fc21dd2a60886d8dd6bd4c5b05">check</a>();
        }
</pre></div>
</div>
</div>
<a class="anchor" id="a858e738a2ea56c9c00a125eb68c2516b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classStunMsg.html#a858e738a2ea56c9c00a125eb68c2516b">StunMsg::setSize</a> </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td>  throw (<a class="el" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>)<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00492">492</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>
<div class="fragment"><pre class="fragment">                                                                      {
                <span class="keywordflow">if</span>(sz&gt;<a class="code" href="classStunMsg.html#a96e06f00cba0b06a6c177afceec197d4">_allocated_sz</a>)
                        <span class="keywordflow">throw</span> <a class="code" href="classWrongStunBufferFormatException.html">WrongStunBufferFormatException</a>();
                <a class="code" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">_sz</a> = sz;
        }
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a96e06f00cba0b06a6c177afceec197d4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classStunMsg.html#a96e06f00cba0b06a6c177afceec197d4">StunMsg::_allocated_sz</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00553">553</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="aea2510fd3224f6e62197302be66d2df3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u08bits* <a class="el" href="classStunMsg.html#aea2510fd3224f6e62197302be66d2df3">StunMsg::_buffer</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00551">551</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="a33bf3b219467baa9a6eaec860be85b33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classStunMsg.html#a33bf3b219467baa9a6eaec860be85b33">StunMsg::_constructed</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00555">555</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="a1b846d9cf7437a436810f20546dcfa2f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classStunMsg.html#a1b846d9cf7437a436810f20546dcfa2f">StunMsg::_deallocate</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00552">552</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<a class="anchor" id="a4388e0163c81ece0381df12de4c1b22a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t <a class="el" href="classStunMsg.html#a4388e0163c81ece0381df12de4c1b22a">StunMsg::_sz</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="TurnMsgLib_8h_source.html#l00554">554</a> of file <a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/client++/<a class="el" href="TurnMsgLib_8h_source.html">TurnMsgLib.h</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Mon Jan 21 2013 13:10:13 for TURN Server by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
